package priv.cwr.springboot.demo.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import priv.cwr.springboot.demo.model.vo.base.Result;

/**
 * @author R
 * @date 2018-8-29
 * @description class ApiException
 */
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@Data
public class ApiException extends RuntimeException {
    private static final long serialVersionUID = 4659981635588337417L;
    private Result result;

    public ApiException(String message, Throwable cause, Result result) {
        super(message, cause);
        this.result = result;
    }

    public ApiException(String message, Result result) {
        super(message);
        this.result = result;
    }

    public ApiException(String message) {
        super(message);
    }
}
